package com.franklin.ideaplugin.maphelper.resolver.impl.collection;

import com.franklin.ideaplugin.maphelper.resolver.AbstractColMemberResolverFactory;
import com.franklin.ideaplugin.maphelper.resolver.IColMemberResolver;
import com.franklin.ideaplugin.maphelper.resolver.impl.collection.json.fastjson.FastJsonParseArrayMethodCallExpressionColMemberResolver;
import com.google.common.collect.Lists;
import com.intellij.openapi.application.ApplicationManager;

import java.util.List;

/**
 * @author Ye Junhui
 * @since 2024/3/6
 */
public class CollectionMemberResolverFactory extends AbstractColMemberResolverFactory {


    @Override
    protected List<IColMemberResolver> getColMemberResolverList() {
        return Lists.newArrayList(
                CollectionNewExpressionColMemberResolver.INSTANCE,
                FastJsonParseArrayMethodCallExpressionColMemberResolver.INSTANCE,
                MapCollectionMethodCallExpressionColMemberResolver.INSTANCE,
                SpecialCollectionMethodCallExpressionResolver.INSTANCE,
                CollectionMethodCallExpressionColMemberResolver.INSTANCE
        );
    }

    public static CollectionMemberResolverFactory getInstance() {
        return ApplicationManager.getApplication().getService(CollectionMemberResolverFactory.class);
    }

}
